home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc19 / gemfsc19.lzh / GEMFUNCS / OBJXTUTL.C < prev    next >
C/C++ Source or Header  |  1993-05-07  |  847b  |  29 lines

  1. /**************************************************************************
  2.  * OBJXTUTL.C - Functions for dealing with extended object types.
  3.  *************************************************************************/
  4.  
  5. #include "gemfintl.h"
  6.  
  7. /*-------------------------------------------------------------------------
  8.  * obj_xtfind - Return index of object with specified extended object type.
  9.  *-----------------------------------------------------------------------*/
  10.  
  11. short obj_xtfind(ptree, parent, xtype)
  12.     register OBJECT *ptree;
  13.     register short      parent;
  14.     register char    xtype;
  15. {
  16.     register short      curobj;
  17.  
  18.     curobj = ptree[parent].ob_head;
  19.     while(curobj != parent && curobj != NO_OBJECT) {
  20.         if (xtype == OBXTYPE(&ptree[curobj])) {
  21.             return curobj;
  22.         }
  23.         curobj = ptree[curobj].ob_next;
  24.     }
  25.     return NO_OBJECT;
  26. }
  27.  
  28.  
  29.